package com.ztesoft.web.common.customdb.dao;

import java.util.List;

import javax.annotation.Resource;

import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.ztesoft.web.common.customdb.dao.mapper.IDmHostConnInfoCustomMapper;
import com.ztesoft.web.common.vo.HostConnInfoVO;

@Repository
public class DmHostConnInfoCustomDao extends SqlSessionDaoSupport {

    @Resource(name = "majorSqlSessionTemplate")
    public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
        super.setSqlSessionTemplate(sqlSessionTemplate);
    }

    public int insert(HostConnInfoVO record) {
        return getMapper().insert(record);
    }

    public int insertSelective(HostConnInfoVO record) {
        return getMapper().insertSelective(record);
    }

    public int insertBatch(List<HostConnInfoVO> records) {
        return getMapper().insertBatch(records);
    }

    public int deleteByPrimaryKey(Integer key) {
        return getMapper().deleteByPrimaryKey(key);
    }


    public int updateByPrimaryKeySelective(HostConnInfoVO record) {
        return getMapper().updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(HostConnInfoVO record) {
        return getMapper().updateByPrimaryKey(record);
    }


    public IDmHostConnInfoCustomMapper getMapper() {
    	return getSqlSession().getMapper(IDmHostConnInfoCustomMapper.class);
    }

}
